﻿<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--

    Licensed to Jasig under one or more contributor license
    agreements. See the NOTICE file distributed with this work
    for additional information regarding copyright ownership.
    Jasig licenses this file to you under the Apache License,
    Version 2.0 (the "License"); you may not use this file
    except in compliance with the License. You may obtain a
    copy of the License at:

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on
    an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied. See the License for the
    specific language governing permissions and limitations
    under the License.

--%>

<%@ page contentType="text/html; charset=UTF-8" %>
<%@page import="cn.org.bjca.security.SecurityEngineDeal"%>
<%@page import="java.util.*,java.io.FileInputStream"%>
<%
	String strServerCert = null;
	String strRandom = null;
	String strSignedData = null;
	SecurityEngineDeal sed = null;
	sed = SecurityEngineDeal.getInstance("SecXV3Default");
    strServerCert = sed.getServerCertificate();
    strRandom = sed.genRandom();
    strSignedData = sed.signData(strRandom);
	//session.setAttribute("Random",strRandom);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD>
	<TITLE>沧州市人民政府综合管理平台</TITLE>
	<LINK href="Images/Default.css" type=text/css rel=stylesheet>
	<LINK href="Images/xtree.css" type=text/css rel=stylesheet>
	<LINK href="Images/User_Login.css" type=text/css rel=stylesheet>
	<META http-equiv=Content-Type content="text/html; charset=UTF-8"/>
<script language="javascript">
<!--
if(self.parent.frames.length!=0){
	self.parent.location=document.location.href;
}
//-->
</script>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
var strServerSignedData = "<%=strSignedData%>";
var strServerRan = "<%=strRandom%>";
var strServerCert = "<%=strServerCert%>";
function LoginForm_onsubmit() {
	var ret;
	var strContainerName = LoginForm.UserList.value;
	var strPin = LoginForm.UserPwd.value;
	ret = Login(LoginForm,strContainerName,strPin);
	LoginForm.UserPwd.value = "";
	return ret;
}

//-->
</SCRIPT>
<script Language="javascript" for="window" event="OnLoad">

		function GetList(strListID) {
			
			var strTemp;
			var strOption;
			var len;
			var strName;
			var strUniqueID;
			var objListID = eval(strListID);
			 
			strTemp = GetUserList();
            g_xmluserlist = "";
			while (1) 
			{
				i=strTemp.indexOf("&&&");
				if (i <= 0) {
					break;
				}
				strOption = strTemp.substring(0,i);
				strName = strOption.substring(0, strOption.indexOf("||"));
				strUniqueID = strOption.substring(strOption.indexOf("||") + 2, strOption.length);
				var objItem = new Option(strName,strUniqueID)
				objListID.add(objItem);
				g_xmluserlist = g_xmluserlist +strName +"||";
				g_xmluserlist = g_xmluserlist +strUniqueID +"&&&";
						
				len = strTemp.length;
			    strTemp = strTemp.substring(i+3,len);
			}
			var objListID = null;
		}

		GetList("LoginForm.UserList");
		</script>
</HEAD>
<BODY id=userlogin_body>
<SCRIPT FOR=bjcactrl EVENT=OnUsbkeyChange LANGUAGE=javascript>
	function GetList_pnp(strListID) 
   { 
	   var i;
	   var strOption;
	   var strName;
	   var strUniqueID;
	   var objListID = eval(strListID);
	   var n = objListID.length;
	
	   for(i=0;i<n;i++)
		 objListID.remove(0);
	 
	   var strTemp = bjcactrl.GetUserListPnp();
	   alter(strTemp);
	   while (1) 
	  {
		  i=strTemp.indexOf("&&&");
		  if (i <= 0) 
		 {
			break;
		 }
		strOption = strTemp.substring(0,i);
		strName = strOption.substring(0, strOption.indexOf("||"));
		strUniqueID = strOption.substring(strOption.indexOf("||") + 2, strOption.length);
		var objItem = new Option(strName,strUniqueID)
		objListID.add(objItem);
		len = strTemp.length;
        strTemp = strTemp.substring(i+3,len);
	  }
   }
   function OnUsbkeyChange() 
   {
		GetList_pnp("LoginForm.UserList");
   }
	
	OnUsbkeyChange();
</SCRIPT>
<DIV></DIV>
<form:form method="post" id="LoginForm" cssClass="fm-v clearfix" commandName="${commandName}" htmlEscape="true" >
<DIV id=user_login>
<DL>
  <DD id=user_top>
  <UL>
    <LI class=user_top_l></LI>
    <LI class=user_top_c></LI>
    <LI class=user_top_r></LI></UL>
  <DD id=user_main>
  <UL>
	  <!--   <LI class=user_main_l></LI> -->
    <LI class=user_main_c>
    <DIV class=user_main_box>
    <UL>
      <LI class=user_main_text>选择证书： </LI>
      <LI class=user_main_input>
		<select id="UserList" name="causername">
			<option  value="123" selected="true" >123</option>
		</select>
		口令<input type="password" name="capassword" id="UserPwd" size="10"></LI>
    </UL>
    </DIV>
    </LI>
    <LI class=user_main_r>
				<input type="hidden" ID="UserSignedData" name="UserSignedData">
				<input type="hidden" ID="UserCert" name="UserCert"> 
				<input type="hidden" ID="ContainerName" name="ContainerName">
			
		<input type="hidden" name="lt" value="${flowExecutionKey}" />
		<input type="hidden" name="_eventId" value="submit" />
    	<INPUT class=IbtnEnterCssClass id=IbtnEnter 
    style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px"   type=image src="Images/user_botton.gif" name=IbtnEnter>
    </LI>
    </UL>
  <DD id=user_bottom>
  <UL>
    <LI class=user_bottom_l></LI>
    <LI class=user_bottom_c></LI>
    <LI class=user_bottom_r></LI>
  </UL>
  </DD>
  </DL>
</DIV>
<SPAN id=ValrUserName style="DISPLAY: none; COLOR: red"></SPAN>
<SPAN id=ValrPassword style="DISPLAY: none; COLOR: red"></SPAN>
<SPAN id=ValrValidateCode style="DISPLAY: none; COLOR: red"></SPAN>
<DIV id=ValidationSummary1 style="DISPLAY: none; COLOR: red"></DIV>
</form:form>
<DIV></DIV>
</BODY>
</HTML>
<SCRIPT language=JavaScript src="/cas/js/SecX_Common.js"></SCRIPT>
